
public class Person implements Comparable<Person> {
	private String firstName;
	private String lastName;
	
	public Person(String inFirst, String inLast) {
		firstName = inFirst;
		lastName = inLast;
	}
	
	public String getFirstName() {
		return firstName;
	}
	
	public String getLastName() {
		return lastName;
	}
	
	@Override
	public boolean equals(Object what) {
		Person other = (Person) what;
		
		if( ! lastName.equals(other.lastName)) {
			return false;
		}
		
		if( ! firstName.equals(other.firstName)) {
			return false;
		}
		
		return true;
	}
	
	@Override
	public int compareTo(Person other) {
		int difference = lastName.compareTo(other.lastName);
		
		if( difference != 0) {
			return difference;
		}
		
		difference = firstName.compareTo(other.firstName);
		
		return difference;
	}
}

